package com.bootdo.goods.service.impl;

import com.bootdo.goods.domain.dto.GoodsAllocationDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.bootdo.goods.dao.TGoodsAllocationDao;
import com.bootdo.goods.domain.TGoodsAllocationDO;
import com.bootdo.goods.service.TGoodsAllocationService;



@Service
public class TGoodsAllocationServiceImpl implements TGoodsAllocationService { 
	@Autowired
	private TGoodsAllocationDao tGoodsAllocationDao;
	
	@Override
	public TGoodsAllocationDO get(Long allocationId){
		return tGoodsAllocationDao.get(allocationId);
	}
	
	@Override
	public List<TGoodsAllocationDO> list(Map<String, Object> map){
		return tGoodsAllocationDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return tGoodsAllocationDao.count(map);
	}
	
	@Override
	public int save(TGoodsAllocationDO tGoodsAllocation){
		return tGoodsAllocationDao.save(tGoodsAllocation);
	}
	
	@Override
	public int update(TGoodsAllocationDO tGoodsAllocation){
		return tGoodsAllocationDao.update(tGoodsAllocation);
	}
	
	@Override
	public int remove(Long allocationId){
		return tGoodsAllocationDao.remove(allocationId);
	}
	
	@Override
	public int batchRemove(Long[] allocationIds){
		return tGoodsAllocationDao.batchRemove(allocationIds);
	}
	@Override
	public TGoodsAllocationDO getTargetAllocation(String trayCode){
		return tGoodsAllocationDao.getTargetAllocation(trayCode);
	}

	@Override
	public TGoodsAllocationDO getAllocation(Long providerId) {
		return tGoodsAllocationDao.getAllocation(providerId);
	}
	@Override
	public void updateOne(String str,Long id) {
		 tGoodsAllocationDao.updateOne(str,id);
	}

	
	@Override
	public void updateGoodids(Long goodsId, int num,Date date,Long allocationId) {
		tGoodsAllocationDao.updateGoodids(goodsId,num,date,allocationId);
	}

	@Override
	public void deleteOne(Long sid) {
		tGoodsAllocationDao.deleteOne(sid);
		
	}

	@Override

	public GoodsAllocationDto getTargetAllocationGoods(String trayCode) {
		return tGoodsAllocationDao.getTargetAllocationGoods(trayCode);
	}
	public TGoodsAllocationDO selectAll(Long goodsId, int goodsNumber, Long providerId) {
		
		return tGoodsAllocationDao.selectAll(goodsId,goodsNumber,providerId);
	}

	@Override
	public TGoodsAllocationDO selectOne(Long providerId) {
		
		return tGoodsAllocationDao.selectOne(providerId);

	}

	@Override
	public TGoodsAllocationDO getOne(String allocationNumber) {
		
		return tGoodsAllocationDao.getOne(allocationNumber);
	}

	@Override
	public TGoodsAllocationDO selectGoodsMsg(String allocationNumber, Long goodsId) {
		// TODO Auto-generated method stub
		return tGoodsAllocationDao.selectGoodsMsg(allocationNumber,goodsId);
	}

	@Override
	public List<GoodsAllocationDto> getAllocationGoods(Long allocationId) {
		return tGoodsAllocationDao.getAllocationGoods(allocationId);
	}

	@Override
	public List<GoodsAllocationDto> getAllocationAloneGoods(Long allocationId) {
		return tGoodsAllocationDao.getAllocationAloneGoods(allocationId);
	}

}
